﻿using LPLS.Commons.DBModule;
using LPLS.DBEntities;
using LPLS.DBEntities.DataCollectionModels;
using LPLS.DBInterface.DataCollectionModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LPLS.DBServices.DataCollectionModels
{
    public class DataCollectionMatePropertyService : DBBaseService  ,IDataCollectionMatePropertyService
    {
        public DataCollectionMatePropertyService(DBContext dbContext) : base(dbContext)
        {
        }

        public int AddData(DataCollectionMateProperty model)
        {
          return  this.Client.Insertable(model).ExecuteCommand();
        }

        public int DeleteData(DataCollectionMateProperty model)
        {
           return this.Client.Deleteable(model).ExecuteCommand();
        }

        public List<DataCollectionMateProperty> GetData()
        {
          return this.Client.Queryable<DataCollectionMateProperty>().ToList();
        }

        public override void InitDataBaseName()
        {
            DataBaseName = DatabaseEnum.CollectionConfigDB.ToString();
        }

        public int Updateddata(DataCollectionMateProperty model)
        {
            return this.Client.Updateable(model).ExecuteCommand();
        }
    }
}
